package com.jic.veteran.portal.controller;

import cn.hutool.core.util.StrUtil;
import com.jic.veteran.common.api.CommonResult;
import com.jic.veteran.portal.domain.DonationListDto;
import com.jic.veteran.portal.service.BigScreenService;
import com.jic.veteran.portal.service.RongjunshopService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
@Api(tags = "RongjunshopController")
@RequestMapping("/rjshop")
public class RongjunshopController {
    @Autowired
    private RongjunshopService rongjunshopService;
//
//    @ApiOperation("用户捐款信息查询")
//    @RequestMapping(value = "/donationInfo", method = RequestMethod.POST)
//    @ResponseBody
//    public CommonResult<DonationListDto> payList(@RequestBody Map<String,String> map) {
//        String unionid = map.get("unionid");
//        if(StrUtil.isNotEmpty(unionid)) {
//            String openid = rongjunshopService.getOpenIdByUnionId(unionid);
//            String startDate = map.get("startDate");
//            String endDate = map.get("endDate");
//            DonationListDto donationListDto = rongjunshopService.getDonationInfoByOpenId(openid,startDate,endDate);
//            return CommonResult.success(donationListDto);
//        }
//        return CommonResult.failed("参数传递错误");
//    }

}
